Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GDScript: Fix non-global class export #93384

Merged

Conversation

dalexeev
Copy link
Member

Technically, the current behavior is not a regression, we just added missing validation for an already existing and documented limitation. But since this breaks plugins (which often try to avoid class_name), I tried to fix it as suggested: when exporting a non-global class property, GDScript looks for the nearest global/native class, rather than throwing an analyzer error.

@dalexeev dalexeev force-pushed the gds-fix-non-global-class-export branch from ef22d75 to 24b6edc Compare June 20, 2024 11:30
Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I confirm this fixes the regression with the Scatter addon in my full project.

Can't assess the code in depth but it seems reasonable to me.

@akien-mga akien-mga merged commit de59dca into godotengine:master Jun 21, 2024
16 checks passed
@akien-mga
Copy link
Member

Thanks!

@dalexeev dalexeev deleted the gds-fix-non-global-class-export branch June 21, 2024 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GDScript "Parse Error: Script export type must be a global class." regression in HungryProton Scatter plugin
2 participants